export const manner = {
	goUrl(pages,urls,tab=true){
		if(tab){
			uni.navigateTo({
				url:`/${pages}/${urls}/${urls}`
			})
		}else{
			uni.switchTab({
				url:`/${pages}/${urls}/${urls}`
			})
		}
	},
	goBack(index=0){
		let pages = getCurrentPages();
		if (pages[pages.length - 2]) {
			uni.navigateBack()
		} else {
			if(index===0){
				uni.switchTab({
					url: '/pages/index/index'
				});
			}else{
				uni.switchTab({
					url: '/pages/user/user'
				});
			}
		}
	},
	toLogin(){
		uni.showToast({
			title:'未登录，请先登录',
			icon:'none',
			duration:2000,
			complete() {
				setTimeout(()=>{
					uni.navigateTo({
						url: '/pages/login/login'
					})
				},2000)
			}
		})
		
	}
}